/**
 * 
 */
package sk.stuba.fiit.foo07.genex.dao;

import java.sql.SQLException;
import java.util.ArrayList;

import sk.stuba.fiit.foo07.genex.beans.Test;

/**
 * @author _mizu_
 * 
 */
public interface TestDao {

    /**
     * Method for getting a test from database
     * 
     * @param testID
     *                id of test
     * @return test
     * 
     */

    public Test getTestByID(Integer testID) throws SQLException;

    /**
     * Method for getting a tests by category from database
     * 
     * @param categoryID
     *                id of test category
     * @return tests
     * 
     */

    public ArrayList<Test> getTestsByCategoryID(Integer categoryID)
            throws SQLException;

    /**
     * Method for adding a test to database
     * 
     * @param testCategoryID
     *                id of category
     * @param toAdd
     *                test to add
     * 
     */

    public void addTest(Integer testCategoryID, Test toAdd) throws SQLException;

    /**
     * Method for adding a tests to database
     * 
     * @param testCategoryID
     *                id of category
     * @param toAdd
     *                tests to add
     * 
     */

    public void addTests(Integer testCategoryID, ArrayList<Test> toAdd)
            throws SQLException;

    /**
     * Method for modifying test in database
     * 
     * 
     * @param toUpdate
     *                bean representing updated test
     * 
     */

    public void updateTest(Test toUpdate) throws SQLException;

    /**
     * Method for deleting test from database
     * 
     * 
     * @param toDelete
     *                bean representing test to delete
     * 
     */

    public void deleteTest(Test toDelete) throws SQLException;

    /**
     * Method for deleting tests from database
     * 
     * 
     * @param toDelete
     *                bean representing tests to delete
     * 
     */

    public void deleteTests(ArrayList<Test> toDelete) throws SQLException;
}
